<template>
	<view class="item">
		<image :src="entity.imageUrl"></image>
		<view class="title">
			<view style="flex: 1;">{{entity.title}}</view>
			<view class="time">{{entity.createTime}}</view>
		</view>
		<view class="sub-title" v-html="entity.message"></view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				entity:{}
			};
		},
		onLoad() {
			const eventChannel = this.getOpenerEventChannel();
			eventChannel.on('sendData', res => {
				this.entity = res;
			})
		},
		methods:{
			
		}
	}
</script>

<style lang="scss" scoped>
	.item{
		display: flex;
		flex-direction: column;
		background-color: #fff;
		margin: 30rpx;
		border-radius: 15rpx;
		image{
			width: 100%;
			height: 300rpx;
			border-radius: 15rpx;
		}
		.title{
			display: flex;
			flex-direction: row;
			align-items: center;
			margin: 15rpx 15rpx 0;
			font-size: 36rpx;
			color: #222;
			font-weight: bold;
			.time{
				font-size: 20rpx;
				color: #888;
				font-weight: normal;
			}
		}
		.sub-title{
			margin: 15rpx;
			font-size: 24rpx;
			color: #555;
		}
	}
	
</style>
